perm filename A45.TEX[106,RWF] blob
sn#834032 filedate 1987-02-09 generic text, type C, neo UTF8
COMMENT ā VALID 00002 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 \magnification\magstephalf
C00004 ENDMK
Cā;
\magnification\magstephalf
\input macro.tex
\def\today{\ifcase\month\or
January\or February\or March\or April\or May\or June\or
July\or August\or September\or October\or November\or December\fi
\space\number\day, \number\year}
\baselineskip 14pt
\rm
\line{\sevenrm a45.tex[106,phy] \today\hfill}
\font\rmn=cmr9
{\rmn
{\narrower\smallskip\noindent
{\bf Exercise:} On some computers, the allowed range for negative integers
is larger than that for positive numbers, for example going from
$-2ā{35}$ to $2ā{35}-1$. On such a~machine, the obvious algorithms
for reading integers cause overflow if the input is a large negative
number. Design an algorithm which does not overlow.
[Use {\tt N:=N*10-(ORD(C)-ORD('0'))} after a negative sign.
\smallskip}
}
\bigskip
\line{\copyright 1985 Robert W. Floyd;
First draft (not published) November 1, 1985\hfil}
%revised: Date; subsequently revised.\hfill}
\bye